(1) Field of the Invention
The present invention relates to program execution devices and methods for controlling the same, and in particular, to a program execution device which controls the program execution device using multiple debuggers without contradictions and a method for controlling the same.
(2) Description of the Related Art
In recent years, there are program execution devices which include a simulator that is capable of simultaneously executing multiple programs running on a single processor or multiple processors, or an evaluation board on which multiple processors are mounted. Such program execution devices are useful for program development and for debugging.
In particular, it is possible to easily find problems by connecting multiple debuggers to the program execution device for simultaneously debugging multiple programs. Here, in principle, the programs executed by the program execution device and the debuggers which debug the programs are in a one-to-one correspondence.
Upon receipt of an execution request from a debugger, the program execution device, which is capable of executing multiple programs in parallel and is connected to multiple debuggers, start executing a program corresponding to the debugger which has made the execution request.
Here, since the program execution device is capable of executing the multiple programs in parallel, it is necessary to synchronize the execution of the multiple programs each of which is debugged by a corresponding debugger.
There is a proposed multicomputer debugger system which provides synchronous execution of multiple programs by including a communication interface for debuggers and synchronizing timing of execution requests from the debuggers (for example, see Japanese Unexamined Patent Application Publication No. 8-171498, hereinafter referred to as Patent Reference 1).
FIG. 14 is a block diagram showing a configuration of the multicomputer debugger system.
The multicomputer debugger system shown in FIG. 14 includes: a program execution device 61 capable of executing multiple programs in parallel; a debugger 11 and a debugger 12 that are connected to the program execution device 61; and a multicomputer debugger 73 that is a communication interface for the debuggers.
The program execution device 61 includes a program execution unit 62 which executes a program to be debugged by the debugger 11, and a program execution unit 63 which executes a program to be debugged by the debugger 12.
The multicomputer debugger system disclosed in Patent Reference 1 uses the multicomputer debugger 73 that is the communication interface for the debuggers so as to synchronize program execution requests made by the debugger 11 and the debugger 12.
Next, examples of typical operations in the multicomputer debugger system, which are “stop” and “break” are described.
(Stop Operation)
First, in the case where the program execution device 61 is executing multiple programs in parallel, one of the debugger 11 and the debugger 12 connected to the program execution device 61, for example, the debugger 11 makes a stop request.
In this case, the program execution device 61 stops executing only the program corresponding to the debugger 11. To be more specific, the program execution device 61 stops the program execution unit 62, and continues execution of other programs, that is, the program corresponding to the debugger 12 in this example. Alternatively, the program execution device 61 stops the program execution unit 62, stops execution of all the programs (here, stops execution of the program corresponding to the debugger 12), and causes all the debuggers (the debugger 11 and the debugger 12) to be in a stopped state.
(Break Operation)
In the case where the program execution device 61 executes multiple programs in parallel and detects a breakpoint, the program execution device 61 stops executing only the program corresponding to the program in which the breakpoint has been detected, in a similar manner as the stop operation. Here, the program execution device 61 continues execution of the other program in which no breakpoint has been detected. Alternatively, the program execution device 61 stops execution of all the programs, and causes all the debuggers (the debugger 11 and the debugger 12) to be in a stopped state.